(rmail-insert-inbox-text): If copy-file fails,
authorRichard M. Stallman <rms@gnu.org>
Fri, 24 Dec 1993 02:49:41 +0000 (02:49 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 24 Dec 1993 02:49:41 +0000 (02:49 +0000)
call rename-file with t as third arg.

lisp/mail/rmail.el

index bbbe818ca7dff5400c534d0507c59585bb13486f..2ea8b6b27f17a39fd44b14b27d0679c5f0234a6e 100644 (file)
@@ -778,7 +778,8 @@ argument causes us to read a file name and use that file as the inbox."
             (condition-case nil
                 (copy-file file tofile nil)
               (error
-               (rename-file file tofile nil)))
+               ;; Third arg is t so we can replace existing file TOFILE.
+               (rename-file file tofile t)))
             ;; Make the real inbox file empty.
             ;; Leaving it deleted could cause lossage
             ;; because mailers often won't create the file.